/*
 * $Id$
 */
package py.firefly.resolution;

import java.io.Reader;
import java.io.StringReader;
import py.firefly.request.Request;
import py.firefly.request.Response;

/**
 *
 * @author myang
 */
public class Streaming implements Resolution {

    private String _contentType;

    public Streaming(final String contentType) {
        _contentType = contentType;
    }

    @Override
    public void execute(final Request req, final Response resp) {
        applyHeaders(resp);
        stream(resp);
    }

    /**
     * 
     * @param resp 
     */
    protected void stream(final Response resp) {

    }

    /**
     * 
     * @param resp 
     */
    protected void applyHeaders(final Response resp) {
        resp.contentType(_contentType);
    }
}
